package com.leanin.form.mapper;

import com.leanin.form.model.LeaninDataDictionary;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface LeaninDataDictionaryMapper {

    int insert(LeaninDataDictionary record);

    int insertSelective(LeaninDataDictionary record);

    //模糊查询
    List<LeaninDataDictionary> findByCode(@Param("code") String code);

    /**
     * 根据表单id 查询字典
     * @param type 1 宣教科室  2 宣教医嘱 3 宣教疾病  4 随访科室  5 满意度科室
     * @param formId 表单id
     * @return
     */
    List<LeaninDataDictionary> findByFormId(@Param("type") Integer type,@Param("formId") Long formId);
}